// pages/Transmit4/Transmit4.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    Path: '', //分享出去的path
    Text: '', //上一步传进来的推荐语
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    var text = options.text;
    var proId = options.proId;
    var sourceId = options.sourceId;

    this.setData({
      Text:text,
      Path: 'pages/index/index?sharePath=/pages/Transmit2/Transmit2&proId=' + proId + '&text=' + text + '&sourceId=' + sourceId + '&userId=' + getApp().globalData.userInfo.user_id,
    })
  },

  // 完成
  done: function() {
    wx.switchTab({
      url: '../index/index',
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function(res) {
    return {
      title: this.data.Text,
      path: this.data.Path,
      success: function(res) {},
      fail: function(er) {}
    }
  }
})